#ifndef __RTMP__
#define __RTMP__

#include <librtmp/rtmp.h>
#include <librtmp/http.h>
#include <librtmp/log.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "X264_Code.h"

// 初始化RTMP-----连接Nginx服务器
int RTMP_ConnectNginx(RTMP **r, char *url);

// 发送NAL单元数据

int RTMPSend_H264_Packet(RTMP *r, unsigned char *h264_buf, unsigned int length, int framtype);

// 发送SPS和PPS帧
int RTMP_SendSpsPacket(RTMP *r, sps_pps *sp);

// 释放资源
int RTMP_Release(RTMP *r);

#endif